﻿using CombinationAssistant.Common;
using CombinationAssistant.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;

namespace CombinationAssistant.Controllers
{
    public class SixFiveSmartCombinationsController : Controller
    {
        //
        // GET: /SixFiveSmartCombinations/



        public ActionResult Index()
        {
            return View();
        }

        //
        // GET: /SixFiveSmartCombinations/Details/5

        public ActionResult Details(int id)
        {
            return View();
        }

        //
        // GET: /SixFiveSmartCombinations/Create

        public ActionResult Create()
        {
            return View();
        }

        //
        // POST: /SixFiveSmartCombinations/Create

        [HttpPost]
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                // TODO: Add insert logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        //
        // GET: /SixFiveSmartCombinations/Edit/5

        public ActionResult Edit(int id)
        {
            return View();
        }

        //
        // POST: /SixFiveSmartCombinations/Edit/5

        [HttpPost]
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add update logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        //
        // GET: /SixFiveSmartCombinations/Delete/5

        public ActionResult Delete(int id)
        {
            return View();
        }

        //
        // POST: /SixFiveSmartCombinations/Delete/5

        [HttpPost]
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        public FileStreamResult DownloadData()
        {
            if (Session["SixFiveSmart"] == null || string.IsNullOrEmpty(Session["SixFiveSmart"].ToString()))
            {
                return null;
            }

            Stream sr = new MemoryStream(ASCIIEncoding.Default.GetBytes(CacheHelper.GetItem(Session["SixFiveSmart"].ToString()) as string));
            return new FileStreamResult(sr, "txt");
        }

        private IList<SixCodeModel> GetDataList(string redCodes, string blueCodes, int combinType = 0)
        {
            if (string.IsNullOrEmpty(redCodes))
            {
                return null;
            }

            return this.DataGenerate(redCodes, blueCodes, combinType);
        }        

        public ActionResult GenerateData(string redCodes, string blueCodes, string combinType)
        {
            return PartialView("_SixFiveSmartDataGridPartial", this.GetDataList(redCodes, blueCodes, Convert.ToInt16(combinType)));
        }

        private List<SixCodeModel> DataGenerate(string redCodes, string blueCodes, int combinType = 0)
        {
            if (redCodes.EndsWith(","))
            {
                redCodes = redCodes.Substring(0, redCodes.Length - 1);
            }

            if (blueCodes.EndsWith(","))
            {
                blueCodes = blueCodes.Substring(0, blueCodes.Length - 1);
            }

            var reds = redCodes.Split(',').Select<string, int>(r => Convert.ToInt16(r)).ToList<int>();
            var blues = blueCodes.Split(',').Select<string, int>(b => Convert.ToInt16(b)).ToList<int>();

            switch (combinType)
            {
                case 0:
                    {
                        switch (reds.Count())
                        {
                            case 8:
                                return this.SixFiveSmartEightCodes(reds, blues);
                            case 9:
                                return this.SixFiveSmartNineCodes(reds, blues);
                            case 10:
                                return this.SixFiveSmartTenCodes(reds, blues);
                            case 11:
                                return this.SixFiveSmartElevenCodes(reds, blues);
                            case 12:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 13:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 14:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 15:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 16:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 17:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            default:
                                return null;
                        }
                    }
                case 1: // 五选五中幸运组合
                    {
                        switch (reds.Count())
                        {
                            case 7:
                                return this.FiveFiveLuckySevenCodes(reds, blues);
                            case 8:
                                return this.FiveFiveLuckyEightCodes(reds, blues);
                            case 9:
                                return this.FiveFiveLuckyNineCodes(reds, blues);
                            case 10:
                                return this.FiveFiveLuckyTenCodes(reds, blues);
                            case 11:
                                return this.FiveFiveLuckyElevenCodes(reds, blues);
                            case 12:
                                return this.FiveFiveLuckyTwelveCodes(reds, blues);
                            case 13:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 14:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 15:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 16:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            case 17:
                                return this.SixFiveSmartFourteenCodes(reds, blues);
                            default:
                                return null;
                        }
                    }

                default:
                    return null;
            }

        }
        #region l六选五中聪明组合
        private List<SixCodeModel> SixFiveSmartEightCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 8)
            {
                srC.Add("A", reds[0]);//3
                srC.Add("B", reds[1]);//3
                srC.Add("C", reds[2]);//3 
                srC.Add("D", reds[3]);//3
                srC.Add("E", reds[4]);//3
                srC.Add("F", reds[5]);//3
                srC.Add("G", reds[6]);//3    
                srC.Add("H", reds[7]);//3 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["G"] });

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }

        private List<SixCodeModel> SixFiveSmartNineCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 9)
            {
                srC.Add("A", reds[0]);//5
                srC.Add("B", reds[1]);//5
                srC.Add("C", reds[2]);//5 
                srC.Add("D", reds[3]);//5
                srC.Add("F", reds[4]);//5
                srC.Add("G", reds[5]);//5
                srC.Add("E", reds[6]);//4    
                srC.Add("H", reds[7]);//4 
                srC.Add("I", reds[8]);//4 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["F"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["I"] });
            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }

        private List<SixCodeModel> SixFiveSmartTenCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 10)
            {
                srC.Add("A", reds[0]);//11
                srC.Add("D", reds[1]);//11
                srC.Add("I", reds[2]);//11 
                srC.Add("B", reds[3]);//9
                srC.Add("E", reds[4]);//9
                srC.Add("F", reds[5]);//9
                srC.Add("G", reds[6]);//9    
                srC.Add("H", reds[7]);//9 
                srC.Add("C", reds[8]);//9    
                srC.Add("J", reds[9]);//9 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["H"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["I"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["C"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }
        private List<SixCodeModel> SixFiveSmartElevenCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 11)
            {
                srC.Add("K", reds[0]);//16
                srC.Add("B", reds[1]);//14
                srC.Add("C", reds[2]);//14 
                srC.Add("D", reds[3]);//14
                srC.Add("E", reds[4]);//14
                srC.Add("F", reds[5]);//14
                srC.Add("G", reds[6]);//14    
                srC.Add("H", reds[7]);//14 
                srC.Add("I", reds[8]);//14    
                srC.Add("J", reds[9]);//14 
                srC.Add("A", reds[10]);//14 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["H"], RedSix = srC["K"] });//1
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["K"] });//2
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });//3

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["I"], RedSix = srC["J"] });//4
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["K"] });//5

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["K"] });//6
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["F"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });//7

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["J"] });//8
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["I"], RedSix = srC["K"] });//9

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["K"] });//10
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });//11

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["J"] });//12
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["K"] });//13
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["K"] });//14

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["I"] });//15
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["K"] });//16
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["K"] });//17
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });//18
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["I"] });//19

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["D"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["K"] });//20

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["B"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["J"], RedSix = srC["K"] });//21

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["C"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });//22
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["C"], RedTwo = srC["D"], RedThree = srC["H"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//23
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["C"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//24
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["D"], RedTwo = srC["F"], RedThree = srC["G"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//25
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["E"], RedTwo = srC["G"], RedThree = srC["H"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//26

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }

        private List<SixCodeModel> SixFiveSmartFourteenCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srCodes = new Dictionary<string, int>();
            if (reds.Count() >= 14)
            {
                srCodes.Add("K", reds[0]);//55
                srCodes.Add("N", reds[1]);//55
                srCodes.Add("A", reds[2]);//54 
                srCodes.Add("H", reds[3]);//54
                srCodes.Add("L", reds[4]);//54
                srCodes.Add("B", reds[5]);//53
                srCodes.Add("M", reds[6]);//53    
                srCodes.Add("D", reds[7]);//52          
                srCodes.Add("F", reds[8]);//52
                srCodes.Add("I", reds[9]);//52
                srCodes.Add("J", reds[10]);//52           
                srCodes.Add("E", reds[11]);//51
                srCodes.Add("C", reds[12]);//51
                srCodes.Add("G", reds[13]);//50 
            }


            var bluesCount = blues.Count;

            var data = new List<SixCodeModel>();
            int index = 0;
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["C"], RedFour = srCodes["D"], RedFive = srCodes["E"], RedSix = srCodes["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["C"], RedFour = srCodes["D"], RedFive = srCodes["G"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["C"], RedFour = srCodes["F"], RedFive = srCodes["G"], RedSix = srCodes["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["C"], RedFour = srCodes["F"], RedFive = srCodes["L"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["C"], RedFour = srCodes["F"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["C"], RedFour = srCodes["I"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["D"], RedFour = srCodes["F"], RedFive = srCodes["M"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["D"], RedFour = srCodes["G"], RedFive = srCodes["H"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["D"], RedFour = srCodes["H"], RedFive = srCodes["L"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["D"], RedFour = srCodes["I"], RedFive = srCodes["L"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["D"], RedFour = srCodes["I"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["H"], RedSix = srCodes["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["E"], RedFour = srCodes["G"], RedFive = srCodes["H"], RedSix = srCodes["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["E"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["E"], RedFour = srCodes["G"], RedFive = srCodes["K"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["E"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["F"], RedFour = srCodes["G"], RedFive = srCodes["I"], RedSix = srCodes["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["F"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["L"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["K"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["B"], RedThree = srCodes["I"], RedFour = srCodes["J"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["E"], RedFive = srCodes["I"], RedSix = srCodes["K"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["F"], RedFive = srCodes["H"], RedSix = srCodes["K"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["F"], RedFive = srCodes["I"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["J"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["L"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["E"], RedFour = srCodes["H"], RedFive = srCodes["I"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["E"], RedFour = srCodes["H"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["F"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["I"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["G"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["G"], RedFour = srCodes["I"], RedFive = srCodes["K"], RedSix = srCodes["L"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["K"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["C"], RedThree = srCodes["H"], RedFour = srCodes["J"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["G"], RedFive = srCodes["J"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["I"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["D"], RedThree = srCodes["F"], RedFour = srCodes["G"], RedFive = srCodes["H"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["D"], RedThree = srCodes["F"], RedFour = srCodes["G"], RedFive = srCodes["I"], RedSix = srCodes["K"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["D"], RedThree = srCodes["F"], RedFour = srCodes["H"], RedFive = srCodes["J"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["D"], RedThree = srCodes["G"], RedFour = srCodes["J"], RedFive = srCodes["M"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["D"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["K"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["G"], RedFive = srCodes["L"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["E"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["K"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["E"], RedThree = srCodes["I"], RedFour = srCodes["J"], RedFive = srCodes["L"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["F"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["K"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["F"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["G"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["K"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["G"], RedThree = srCodes["H"], RedFour = srCodes["J"], RedFive = srCodes["L"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["G"], RedThree = srCodes["K"], RedFour = srCodes["L"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["A"], RedTwo = srCodes["H"], RedThree = srCodes["J"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["F"], RedFive = srCodes["G"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["H"], RedFive = srCodes["I"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["H"], RedFive = srCodes["J"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["D"], RedFour = srCodes["H"], RedFive = srCodes["K"], RedSix = srCodes["L"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["K"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["E"], RedFour = srCodes["G"], RedFive = srCodes["I"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["E"], RedFour = srCodes["H"], RedFive = srCodes["K"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["E"], RedFour = srCodes["J"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["F"], RedFour = srCodes["H"], RedFive = srCodes["L"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["F"], RedFour = srCodes["I"], RedFive = srCodes["K"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["K"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["G"], RedFour = srCodes["J"], RedFive = srCodes["L"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["C"], RedThree = srCodes["I"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["G"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["H"], RedSix = srCodes["K"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["H"], RedSix = srCodes["L"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["G"], RedFive = srCodes["H"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["G"], RedFive = srCodes["I"], RedSix = srCodes["K"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["I"], RedFive = srCodes["K"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["L"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["F"], RedFour = srCodes["I"], RedFive = srCodes["K"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["G"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["G"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["D"], RedThree = srCodes["H"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["H"], RedFive = srCodes["J"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["E"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["E"], RedThree = srCodes["H"], RedFour = srCodes["J"], RedFive = srCodes["L"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["F"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["I"], RedSix = srCodes["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["F"], RedThree = srCodes["G"], RedFour = srCodes["I"], RedFive = srCodes["L"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["F"], RedThree = srCodes["H"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["G"], RedThree = srCodes["H"], RedFour = srCodes["J"], RedFive = srCodes["M"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["B"], RedTwo = srCodes["I"], RedThree = srCodes["K"], RedFour = srCodes["L"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["G"], RedSix = srCodes["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["F"], RedFive = srCodes["I"], RedSix = srCodes["L"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["G"], RedFive = srCodes["L"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["E"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["F"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["F"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["J"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["G"], RedFour = srCodes["K"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["D"], RedThree = srCodes["H"], RedFour = srCodes["K"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["H"], RedFive = srCodes["J"], RedSix = srCodes["K"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["E"], RedThree = srCodes["G"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["K"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["E"], RedThree = srCodes["J"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["F"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["I"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["F"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["L"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["F"], RedThree = srCodes["G"], RedFour = srCodes["J"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["H"], RedThree = srCodes["I"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["C"], RedTwo = srCodes["I"], RedThree = srCodes["K"], RedFour = srCodes["L"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["E"], RedThree = srCodes["F"], RedFour = srCodes["K"], RedFive = srCodes["M"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["E"], RedThree = srCodes["G"], RedFour = srCodes["H"], RedFive = srCodes["I"], RedSix = srCodes["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["E"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["J"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["E"], RedThree = srCodes["H"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["E"], RedThree = srCodes["H"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["F"], RedThree = srCodes["H"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["F"], RedThree = srCodes["J"], RedFour = srCodes["L"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["D"], RedTwo = srCodes["G"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["L"], RedSix = srCodes["M"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["E"], RedTwo = srCodes["F"], RedThree = srCodes["G"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["L"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["E"], RedTwo = srCodes["F"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["E"], RedTwo = srCodes["G"], RedThree = srCodes["H"], RedFour = srCodes["I"], RedFive = srCodes["L"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["E"], RedTwo = srCodes["G"], RedThree = srCodes["H"], RedFour = srCodes["J"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["F"], RedTwo = srCodes["G"], RedThree = srCodes["H"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["F"], RedTwo = srCodes["G"], RedThree = srCodes["I"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["M"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["F"], RedTwo = srCodes["G"], RedThree = srCodes["I"], RedFour = srCodes["K"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["F"], RedTwo = srCodes["H"], RedThree = srCodes["I"], RedFour = srCodes["J"], RedFive = srCodes["K"], RedSix = srCodes["L"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["G"], RedTwo = srCodes["I"], RedThree = srCodes["J"], RedFour = srCodes["K"], RedFive = srCodes["L"], RedSix = srCodes["N"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srCodes["I"], RedTwo = srCodes["J"], RedThree = srCodes["K"], RedFour = srCodes["L"], RedFive = srCodes["M"], RedSix = srCodes["N"] });

            // data.RemoveAll(d => !d.IsLuckyNumber);

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }
        #endregion

        private List<SixCodeModel> FiveFiveLuckySevenCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 7)
            {
                srC.Add("A", reds[0]);//5
                srC.Add("G", reds[1]);//4
                srC.Add("C", reds[2]);//4 
                srC.Add("D", reds[3]);//4
                srC.Add("E", reds[4]);//4
                srC.Add("F", reds[5]);//4
                srC.Add("B", reds[6]);//5 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["E"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["F"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["G"] });

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }
        private List<SixCodeModel> FiveFiveLuckyEightCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 8)
            {
                srC.Add("A", reds[0]);//7
                srC.Add("C", reds[1]);//7
                srC.Add("F", reds[2]);//7 
                srC.Add("H", reds[3]);//7
                srC.Add("E", reds[4]);//6
                srC.Add("B", reds[5]);//6
                srC.Add("G", reds[6]);//6 
                srC.Add("D", reds[7]);//6 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["E"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["F"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }
        private List<SixCodeModel> FiveFiveLuckyNineCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 9)
            {
                srC.Add("A", reds[0]);//20
                srC.Add("E", reds[1]);//13
                srC.Add("F", reds[2]);//13 
                srC.Add("G", reds[3]);//13
                srC.Add("H", reds[4]);//13
                srC.Add("B", reds[5]);//12
                srC.Add("C", reds[6]);//12 
                srC.Add("D", reds[7]);//12 
                srC.Add("I", reds[8]);//12 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["E"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["F"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["H"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["H"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });



            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }
        private List<SixCodeModel> FiveFiveLuckyTenCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 10)
            {
                srC.Add("A", reds[0]);//30
                srC.Add("I", reds[1]);//18
                srC.Add("J", reds[2]);//18 
                srC.Add("B", reds[3]);//17
                srC.Add("C", reds[4]);//17
                srC.Add("D", reds[5]);//17
                srC.Add("E", reds[6]);//17 
                srC.Add("G", reds[7]);//17 
                srC.Add("F", reds[8]);//14 
                srC.Add("H", reds[9]);//14 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["E"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["F"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["H"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["I"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["G"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["I"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["I"], RedSix = srC["J"] });
        
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["I"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["H"], RedSix = srC["I"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["I"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }

        private List<SixCodeModel> FiveFiveLuckyElevenCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 11)
            {
                srC.Add("A", reds[0]);//30
                srC.Add("C", reds[1]);//18
                srC.Add("K", reds[2]);//18 
                srC.Add("B", reds[3]);//17
                srC.Add("D", reds[4]);//17
                srC.Add("E", reds[5]);//17
                srC.Add("H", reds[6]);//17 
                srC.Add("F", reds[7]);//17 
                srC.Add("G", reds[8]);//14 
                srC.Add("I", reds[9]);//14 
                srC.Add("J", reds[10]);//14 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["E"], RedSix = srC["G"] });//1
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["E"], RedSix = srC["J"] });//2
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["F"], RedSix = srC["G"] });//3
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["F"], RedSix = srC["J"] });//4
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["H"], RedSix = srC["I"] });//5
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["H"], RedSix = srC["K"] });//6

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["G"] });//7
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["H"] });//8
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["H"], RedSix = srC["I"] });//9
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["H"], RedSix = srC["K"] });//10

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["F"], RedFive = srC["I"], RedSix = srC["K"] });//11
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });//12
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["G"], RedFive = srC["J"], RedSix = srC["K"] });//13
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });//14


            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["H"] });//15
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["I"], RedSix = srC["K"] });//16

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["I"] });//17
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["J"], RedSix = srC["K"] });//18
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["K"] });//19
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });//20
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["K"] });//21

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["K"] });//22
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["I"], RedSix = srC["J"] });//23
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });//24
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["K"] });//25
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] }); //26           

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });//27
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["F"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["K"] });//28

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["I"] });//29
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["K"] });//30
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["H"], RedSix = srC["K"] });//31

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["K"] });//32
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });//33
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["K"] });//34
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//35

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["J"], RedSix = srC["K"] });//36
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["K"] });//37
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });//38
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["K"] });//39
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["K"] });//40

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["K"] });//41
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });//42
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });//43

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["J"] });//44
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });//45
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["J"], RedSix = srC["K"] });//46
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });//47

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] });//48
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["J"], RedSix = srC["K"] });//49
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["K"] });//50
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//51

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });//52
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["K"] });//53
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["K"] });//54
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["G"], RedThree = srC["H"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//55

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }

        private List<SixCodeModel> FiveFiveLuckyTwelveCodes(List<int> reds, List<int> blues)
        {

            Dictionary<string, int> srC = new Dictionary<string, int>();
            if (reds.Count() >= 12)
            {
                srC.Add("A", reds[0]);//66
                srC.Add("B", reds[1]);//30
                srC.Add("C", reds[2]);//30 
                srC.Add("D", reds[3]);//30
                srC.Add("E", reds[4]);//30
                srC.Add("F", reds[5]);//30
                srC.Add("G", reds[6]);//30 
                srC.Add("H", reds[7]);//30 
                srC.Add("I", reds[8]);//30 
                srC.Add("J", reds[9]);//30 
                srC.Add("K", reds[10]);//30 
                srC.Add("L", reds[11]);//30 
            }

            var bluesCount = blues.Count;
            var data = new List<SixCodeModel>();
            int index = 0;

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["E"], RedSix = srC["L"] });//1
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["F"], RedSix = srC["K"] });//2
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["G"], RedSix = srC["H"] });//3
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["D"], RedFive = srC["I"], RedSix = srC["J"] });//4

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["J"] });//5
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["J"], RedSix = srC["K"] });//6
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["E"], RedFive = srC["H"], RedSix = srC["I"] });//7

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["I"] });//8
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["L"] });//9

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["G"], RedFive = srC["J"], RedSix = srC["L"] });//10

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["K"] });//11
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["C"], RedFour = srC["I"], RedFive = srC["K"], RedSix = srC["L"] });//12

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["J"] });//13
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["H"], RedSix = srC["J"] });//14
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["I"], RedSix = srC["K"] });//15

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["I"] });//16
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["J"], RedSix = srC["L"] });//17

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["L"] });//18
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["J"], RedSix = srC["K"] });//19
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["D"], RedFour = srC["H"], RedFive = srC["K"], RedSix = srC["L"] });//20

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["K"] });//21
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["I"], RedSix = srC["L"] });//22
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["L"] });//23
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });//24
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["E"], RedFour = srC["J"], RedFive = srC["K"], RedSix = srC["L"] });//25

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["J"] }); //26 
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["K"], RedSix = srC["L"] });//27
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["F"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//28

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["K"] });//29
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["B"], RedThree = srC["H"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["L"] });//30

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["F"], RedSix = srC["I"] });//31
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["G"], RedSix = srC["J"] });//32
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["E"], RedFive = srC["H"], RedSix = srC["K"] });//33
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["L"] });//34
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["J"] });//35

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["K"] });//36
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["L"] });//37
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["D"], RedFour = srC["J"], RedFive = srC["K"], RedSix = srC["L"] });//38
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["G"], RedSix = srC["H"] });//39
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["K"], RedSix = srC["L"] });//40
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["L"] });//41

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["L"] });//42
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["E"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//43

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["J"], RedSix = srC["K"] });//44
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["K"] });//45
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["F"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["L"] });//46

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });//47
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["C"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["K"], RedSix = srC["L"] });//48

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["H"], RedSix = srC["L"] });//49
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["F"], RedFive = srC["J"], RedSix = srC["K"] });//50
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["I"] });//51

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["G"], RedFive = srC["K"], RedSix = srC["L"] });//52
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["E"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["L"] });//53

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["H"], RedSix = srC["K"] });//54
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["J"] });//55

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["F"], RedFour = srC["I"], RedFive = srC["K"], RedSix = srC["L"] });//56
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["L"] });//57
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["D"], RedThree = srC["H"], RedFour = srC["I"], RedFive = srC["J"], RedSix = srC["K"] });//58

            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["I"], RedSix = srC["K"] });//59
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["G"], RedFive = srC["J"], RedSix = srC["L"] });//60
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["F"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["J"] });//61
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["J"], RedSix = srC["K"] });//62
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["E"], RedThree = srC["H"], RedFour = srC["I"], RedFive = srC["K"], RedSix = srC["L"] });//63
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["F"], RedThree = srC["G"], RedFour = srC["H"], RedFive = srC["I"], RedSix = srC["L"] });//64
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["F"], RedThree = srC["H"], RedFour = srC["J"], RedFive = srC["K"], RedSix = srC["L"] });//65
            data.Add(new SixCodeModel { Id = ++index, RedOne = srC["A"], RedTwo = srC["G"], RedThree = srC["I"], RedFour = srC["J"], RedFive = srC["K"], RedSix = srC["L"] });//66

            var dataCount = data.Count;
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < dataCount; i++)
            {
                data[i].Blue = blues[i % bluesCount];
                sb.Append(data[i].ToString());
                sb.Append("\r\n");
            }

            if (Session["SixFiveSmart"] == null)
            {
                Session["SixFiveSmart"] = Session.SessionID + "-" + "SixFiveSmart";
            }

            CacheHelper.AddCacheItem(Session["SixFiveSmart"].ToString(), sb.ToString());

            return data;
        }
    }
}
